/* Sokoban
 * HIT3243
 * Authors: Mike Blackney, Ben Ingarfield, Kurniawan
 */

#pragma once

#include "dxf.h"
#include "level.h"

// A complete blank state for making non-GUI states.
// If you want a GUI state, use the Title state as a
// starting point.

class Game : public dxf::GameState {
public:
	static Game* const Instance( );

	virtual HRESULT Load( );
	virtual void Unload( );

	virtual void Update(double fTime, float fElapsedTime);
	virtual void Render2D(double fTime, float fElapsedTime);
	virtual void Render3D(double fTime, float fElapsedTime);
	virtual void Resize(const D3DSURFACE_DESC* pBackBufferSurfaceDesc);
	virtual bool MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	virtual HRESULT OnCreateDevice( IDirect3DDevice9*, const D3DSURFACE_DESC* );
	virtual HRESULT OnResetDevice( IDirect3DDevice9*, const D3DSURFACE_DESC* );
	virtual void OnLostDevice( );

protected:
	Game( );

	// Font for the score:
	dxf::Font font;
	// Sprites for interface:
	dxf::Sprite turns, pushes, time;

	// Reference to the level instance:
	Level &level;
};
